<!doctype html>
<html>
<head>
    <meta charset=utf-8>
    <title></title>
    <meta name="robots" content="noindex,nofollow">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="<?=Web_Path?>packs/layui/css/layui.css">
    <link rel="stylesheet" href="<?=Web_Path?>packs/admin/css/font.css">
    <link rel="stylesheet" href="<?=Web_Path?>packs/admin/css/style.css">
    <script src="<?=Web_Path?>packs/js/jquery.min.js"></script>
    <script src="<?=Web_Path?>packs/layui/layui.js"></script>
    <script src="<?=Web_Path?>packs/admin/js/cscms.js"></script>
</head>
<body>
    <span class="layui-breadcrumb" >
        <a ><cite><i class="fa fa-map-marker"></i><?=L('tpl_01')?></cite></a>
        <a href="javascript:;"><?=L('tpl_02')?></a>
        <a href="<?=site_url('pay/lists')?>"><?=L('tpl_03')?></a>
        <a href="<?=site_url('pay/income')?>"><?=L('tpl_06')?></a>
    </span>
    <div class="layui-tab layui-tab-brief" >
        <ul class="layui-tab-title">
            <li><a class="tablink" href="<?=site_url('pay/lists')?>"><?=L('tpl_04')?></a></li>
            <li><a class="tablink" href="<?=site_url('pay/spend')?>"><?=L('tpl_05')?></a></li>
            <li class="layui-this"><a class="tablink" href="<?=site_url('pay/income')?>"><?=L('tpl_06')?></a></li>
            <li><a class="tablink" href="<?=site_url('pay/card')?>"><?=L('tpl_07')?></a></li>
        </ul>
        <div class="layui-tab-content" style="min-height: 260px;">
            <form class="layui-form layui-form-so" action="<?=site_url('pay/income')?>" method="post">
                <div class="layui-form-item">
                    
                    <div class="layui-input-inline">
                        <select name="zd">
                            <option value="name" <?php if($zd=='name') echo ' selected';?>><?=L('tpl_pi_01')?></option>
                            <option value="id" <?php if($zd=='id') echo ' selected';?>><?=L('tpl_pi_02')?></option>
                        </select>
                    </div>
                    <div class="layui-input-inline">
                        <input type="text" name="key" value="<?=$key?>" class="layui-input">
                    </div>
                    <label class="layui-form-label"><?=L('tpl_pi_03')?></label>
                    <div class="layui-input-inline">
                        <input style="width:90px;" name="kstime" id="kstime" type="text" value="<?=$kstime?>" class="layui-input" />  
                    </div>
                    <div class="layui-input-inline">-</div>
                    <div class="layui-input-inline">
                        <input style="width:90px;" name="jstime" id="jstime" value="<?=$jstime?>" type="text" class="layui-input" />
                    </div>
                    <div class="layui-input-inline">
                        <select name="sid">
                            <option value="0"<?php if($sid==0) echo ' selected';?>><?=L('tpl_pi_04')?></option>
                            <option value="1"<?php if($sid==1) echo ' selected';?>><?=L('tpl_pi_05')?></option>
                            <option value="2"<?php if($sid==2) echo ' selected';?>><?=L('tpl_pi_06')?></option>
                        </select>
                    </div>
                     <div class="layui-input-inline">
                        <button class="layui-btn" type="submit"><?=L('tpl_pi_07')?></button>
                    </div>
                </div>
            </form>
            <form class="layui-form" action="<?=site_url('pay/income_del')?>" method="post">
                <table class="layui-table">
                    <thead>
                        <tr>
                            <th><?=L('tpl_pi_08')?></th>
                            <th class="phide"><?=L('tpl_pi_09')?></th>
                            <th><?=L('tpl_pi_10')?></th>
                            <th class="phide"><?=L('tpl_pi_11')?></th>
                            <th class="phide"><?=L('tpl_pi_12')?></th>
                            <th><?=L('tpl_pi_13')?></th>
                            <th><?=L('tpl_pi_14')?></th>
                            <th class="phide"><?=L('tpl_pi_15')?></th>
                            <th class="phide"><?=L('tpl_pi_16')?></th>
                        </tr>
                    </thead>
                    <tbody>
                    <?php
                        if(empty($income)) echo '<tr><td align="center" height="50" colspan="9">'.L('tpl_pi_17').'</td></tr>';
                        foreach ($income as $row) {
                            //类型
                            if($row->sid==0){
                                $lx='<font color=#0000ff>'.L('tpl_pi_18').'</font>';
                            }else{
                                $lx='<font color=red>'.L('tpl_pi_19').'</font>';
                            }
                            //会员
                            $rowu=$this->db->query("SELECT name FROM ".CS_SqlPrefix."user where id=".$row->uid."")->row();
                            $uname=($rowu)?$rowu->name:L('tpl_pi_20').$row->uid;
                            echo '
                            <tr id="row_'.$row->id.'">
                            <td><input name="id['.$row->id.']" class="xuan" type="checkbox" value="'.$row->id.'" /></td>
                            <td class="phide">'.$row->dir.'</td>
                            <td>'.$uname.'</td>
                            <td class="phide">'.$row->title.'</td>
                            <td class="phide">'.date('Y-m-d',$row->addtime).'</td>
                            <td>'.$lx.'</td>
                            <td>'.$row->nums.'</td>
                            <td class="phide">'.$row->ip.'</td>
                            <td class="phide"><a class="layui-btn layui-btn-mini layui-btn-danger" href="javascript:cscms.del_one(\''.site_url('pay/income_del').'?id='.$row->id.'\','.$row->id.');">'.L('tpl_pi_21').'</a></td>
                            </tr> ';
                        }
                    ?>
                    </tbody>
                </table>
                <div class="more_func">
                    <a class="layui-btn layui-btn-primary layui-btn-small" href="javascript:cscms.select_all();"><i class="fa fa-check colorl" ></i><?=L('tpl_pi_22')?></a>
                    <a class="layui-btn layui-btn-primary layui-btn-small" lay-submit lay-filter="del_pl"><i class="fa fa-close " style="color: red" ></i><?=L('tpl_pi_23')?></a>
                </div>
            </form>
            <div id="page">
                <div class="data_nums phide"><?=$page_data?></div>
                <div class="data_page"><?=$page_list?></div>
            </div>
        </div>
    </div>
    <script type="text/javascript">
        cscms.init();
        cscms.mode("cscms.getTime('kstime')");
        cscms.mode("cscms.getTime('jstime')");
    </script>
</body>
</html>